package net.homeip.mmhg.util;

import net.homeip.mmhg.game.GameContext;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * Configures game context setting lists of teams and tasks.
 *
 * @author ilya gerasimov
 */
@Component
public class GameContextConfigurer implements InitializingBean {

	private GameContext context;
	
	@Autowired
	public void setGameContext(GameContext context) {
		this.context = context;
	}
	
	@Override
	public void afterPropertiesSet() throws Exception {
		context.initialize();
	}

}
